Matching Nuts and Bolts Noga Alon
نویسندگان
چکیده
We describe a procedure which may be helpful to any disorganized carpenter who has a mixed pile of bolts and nuts and wants to nd the corresponding pairs of bolts and nuts. The procedure uses our (and the carpenter's) ability to construct e ciently highly expanding graphs. The problem considered is given a collection of n bolts of distinct widths and n nuts such that there is a 1-1 correspondence between the nuts and bolts. The goal is to nd for each bolt its corresponding nut by comparing nuts to bolts but not nuts to nuts or bolts to bolts. Our objective is to minimize the number of operations of this kind (as well as the total running time). The problem has a randomized algorithm similar to Quicksort. Our main result is an n(logn) O(1) Department of Mathematics, Raymond and Beverly Sackler Faculty of Exact Sciences, Tel Aviv University, Tel Aviv, Israel and AT & T Bell Labs, Murray Hill, NJ 07974, USA. e-mail: [email protected]. Research supported in part by a United States Israel BSF Grant y Computer Science Division, University of California at Berkeley, Berkeley, CA 94720, USA. e-mail: [email protected]. Supported by NSF grant CCR92-01092. z Department of Computer Science, Raymond and Beverly Sackler Faculty of Exact Sciences, Tel Aviv University, Tel Aviv, Israel. e-mail: [email protected]. Research supportedby a grant from the Israeli Academy of Sciences x Department of Computer Science, University of Arizona, USA. e-mail: [email protected]. { Department of Applied Mathematics and Computer Science, TheWeizmann Institute of Science, Rehovot 76100, Israel. e-mail: [email protected]. Supported by an Alon Fellowship. k University of California at Berkeley Computer Science Division, and International Computer Science Institute at Berkeley. e-mail: [email protected]. Supported by NSF postdoctoral fellowship and ICSI. Part of this work was done while visiting Tel Aviv University and Hebrew University of Jerusalem. time deterministic algorithm, based on expander graphs, for matching the bolts and the nuts.
منابع مشابه
Matching Nuts and Bolts Faster
The problem of matching nuts and bolts is the following Given a collection of n nuts of distinct sizes and n bolts such that there is a one to one correspondence between the nuts and the bolts nd for each nut its corresponding bolt We can only compare nuts to bolts That is we can neither compare nuts to nuts nor bolts to bolts This humble restriction on the comparisons appears to make this prob...
متن کاملMatching Nuts and Bolts in O(n log n) Time
Given a set of n nuts of distinct widths and a set of n bolts such that each nut corresponds to a unique bolt of the same width, how should we match every nut with its corresponding bolt by comparing nuts with bolts? (No comparison is allowed between two nuts or two bolts.) The problem can be naturally viewed as a variant of the classic sorting problem as follows. Given two lists of n numbers e...
متن کاملMatching Nuts and Bolts Optimally∗
The nuts and bolts problem is the following : Given a collection of n nuts of distinct sizes and n bolts of distinct sizes such that for each nut there is exactly one matching bolt, find for each nut its corresponding bolt subject to the restriction that we can only compare nuts to bolts. That is we can neither compare nuts to nuts, nor bolts to bolts. This humble restriction on the comparisons...
متن کاملMatching Nuts and Bolts Extended Abstract
We describe a procedure which may be helpful to any disorganized carpenter who has a mixed pile of bolts and nuts and wants to nd the corresponding pairs of bolts and nuts. The procedure uses our (and the carpenter's) ability to construct e ciently highly expanding graphs. The problem considered is given a collection of n bolts of distinct widths and n nuts such that there is a 1-1 corresponden...
متن کاملThe Maximum Number of Perfect Matchings in Graphs with a Given Degree Sequence
We show that the number of perfect matching in a simple graph G with an even number of vertices and degree sequence d1, d2, . . . , dn is at most ∏ n i=1 (di!) 1 2di This bound is sharp if and only if G is a union of complete balanced bipartite graphs. 2000 Mathematics Subject Classification: 05A15, 05C70.
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 1994